import java.awt.Graphics;

import javax.swing.JPanel;


public class Panel extends JPanel{
	private static final long serialVersionUID = 1L;
	private boolean msg = false;
	private IDraw drawBehaviour;

	public void paintComponent(Graphics g) {
		if (msg) {
			drawBehaviour.drawShape(g);
			msg = false;
		}
	}

	public boolean isMsg() {
		return msg;
	}

	public void setMsg(boolean msg) {
		this.msg = msg;
	}

	public IDraw getDrawBehavior() {
		return drawBehaviour;
	}

	public void setDrawBehavior(IDraw drawBehavior) {
		this.drawBehaviour = drawBehavior;
	}
}
